<template>
  <!--波浪形状 -->
  <div id="waves">
    <svg
      class="waves"
      xmlns="http://www.w3.org/2000/svg"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      viewBox="0 24 150 28"
      preserveAspectRatio="none"
      shape-rendering="auto"
    >
      <defs>
        <path
          id="gentle-wave"
          d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"
        ></path>
      </defs>
      <g class="parallax">
        <use xlink:href="#gentle-wave" x="48" y="0"></use>
        <use xlink:href="#gentle-wave" x="48" y="3"></use>
        <use xlink:href="#gentle-wave" x="48" y="5"></use>
        <use xlink:href="#gentle-wave" x="48" y="7"></use>
      </g>
    </svg>
  </div>
  <!-- 下滑锚点-->
  <div
    class="headertop-down faa-float animated"
    @click="headerTopDown('#page')"
  >
    <span> <i class="fa fa-angle-double-down" aria-hidden="true"></i> </span>
  </div>

  <!--视频播放按钮-->
  <div id="video-container">
    <div id="video-btn" class="loadvideo"></div>
  </div>
</template>

<script setup>
  import { headerTopDown } from '@/utils/webutils'
</script>

<style lang="scss" scoped>
  #waves {
    height: 70px;
    position: absolute;
    bottom: 0;
    width: 400%;
    z-index: 5;
    transition-duration: 0.4s, 0.4s;
  }

  @-webkit-keyframes wave {
    0% {
      transform: translate3d(-90px, 0, 0);
    }

    100% {
      transform: translate3d(85px, 0, 0);
    }
  }

  @keyframes wave {
    0% {
      transform: translate3d(-90px, 0, 0);
    }

    100% {
      transform: translate3d(85px, 0, 0);
    }
  }

  .waves {
    width: 100%;
    margin-bottom: -0.6875rem;
    min-height: 3.125rem;
    max-height: 9.375rem;
    position: relative;
    .parallax > use {
      -webkit-animation: wave 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
      animation: wave 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
    }

    .parallax > use:nth-child(1) {
      -webkit-animation-delay: -2s;
      animation-delay: -2s;
      -webkit-animation-duration: 7s;
      animation-duration: 7s;
      fill: var(--grey-1-a7);
    }
    --grey-1: #fdfdfd;
    --grey-1-a0: rgba(253, 253, 253, 0);
    --grey-1-a7: rgba(253, 253, 253, 0.7);
    --grey-1-a5: rgba(253, 253, 253, 0.5);
    --grey-1-a3: rgba(253, 253, 253, 0.3);
    --grey-9-a1: rgba(0, 0, 0, 0.1);
    --grey-9-a5: rgba(0, 0, 0, 0.5);
    --grey-2-a0: rgba(247, 247, 247, 0);
    .parallax > use:nth-child(2) {
      -webkit-animation-delay: -3s;
      animation-delay: -3s;
      -webkit-animation-duration: 10s;
      animation-duration: 10s;
      fill: var(--grey-1-a5);
    }

    .parallax > use:nth-child(3) {
      -webkit-animation-delay: -4s;
      animation-delay: -4s;
      -webkit-animation-duration: 13s;
      animation-duration: 13s;
      fill: var(--grey-1-a3);
    }

    .parallax > use:nth-child(4) {
      -webkit-animation-delay: -5s;
      animation-delay: -5s;
      -webkit-animation-duration: 20s;
      animation-duration: 20s;
      fill: var(--grey-1);
    }
  }
</style>
